﻿
@{
    Layout = null;
}
<style type="text/css">
    ul {
        list-style: none;
        padding-left: 0px;
    }
    .uploadpic > li:first-child {
        background: url(/Content/img/camera-upload.png) no-repeat center;
    }
    .control-label {
        max-width: 130px;
    }
    .uploadpic > li {
        display: inline-block;
        position: relative;
        display: inline-block;
        border-radius: 4px;
        overflow: hidden;
        color: #1E88C7;
        text-decoration: none;
        text-indent: 0;
        line-height: 20px;
        height: 50px;
        width: 50px;
        margin-right: 10px;
    }
    .file {
        position: relative;
        display: inline-block;
        border-radius: 4px;
        overflow: hidden;
        color: #1E88C7;
        text-decoration: none;
        text-indent: 0;
        line-height: 20px;
        height: 50px;
        width: 50px;
    }
    .file input {
        position: absolute;
        right: 0;
        top: 0;
        opacity: 0;
        width: 50px;
        height: 50px;
    }
    #showUserImage {
        display: inline-block;
        width: 50px;
        height: 50px;
    }
</style>

<div class="panel-body" style="padding:0">
    <div class="panel panel-default">
        <div class="panel-heading"></div>
        <div class="panel-body">
            <form id="formSearch" class="form-horizontal">
                <div class="form-group">
                    <label class="control-label" for="name_search">分类名称:</label>
                    <div class="col-sm-3">
                        <input type="text" class="form-control" id="name_search" placeholder="请输入分类名称">
                    </div>
                    <div class="col-sm-3">
                        <button type="button" id="btnQueryList" class="btn btn-primary"><i class="fa fa-search"></i>查询</button>
                        <button type="button" id="btnReset" class="btn btn-primary"><i class="fa fa-remove"></i>清空</button>
                    </div>
                </div>
            </form>
            <hr />
            <div>
                <table id="platformcategoryinfo"></table>
            </div>
        </div>
    </div>
</div>

<div id="toolbar" class="btn-group">
    <button id="btnAddPlatFormDialog" type="button" class="btn btn-primary"><span><i class="fa fa-edit"></i>&nbsp;添加</span></button>
    <button id="btnEditPlatFormDialog" type="button" class="btn btn-primary"><span><i class="fa fa-book"></i>&nbsp;修改</span></button>
    <button id="btnDelPlatFormDialog" type="button" class="btn btn-primary"><span><i class="fa fa-remove"></i>&nbsp;删除</span></button>
</div>

@*添加修改平台类别*@
<div class="modal fade" id="AddPlatFormCategoryModal" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"> &times;</button>
                <h4 class="modal-title" id="HeadTitle">添加平台类别</h4>
            </div>
            <div class="modal-body">
                <form id="AddPlatFormCategoryOperation" method="post" class="form-horizontal">
                    <input type="hidden" id="Id" name="Id" />
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">类别名称:</span>
                            <input type="text" id="name" name="name" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">类别排序:</span>
                            <input type="text" id="sort" name="sort" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">是否启用:</span>
                            <select class="form-control" id="enable" name="enable">
                                <option value="0">启用</option>
                                <option value="1">禁用</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">预览图:</span>
                            <div class="col-sm-10 camera">
                                <ul class="uploadpic">
                                    <li>
                                        <a href="javascript:void(0);" class="file">
                                            <input type="file" id="file" name="file" class="btnupload" />
                                        </a>
                                    </li>
                                    <li>
                                        <img src="" id="showUserImage" />
                                    </li>
                                </ul>
                            </div>
                         </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-reply"></i>取消</button>
                <button type="button" class="btn btn-primary" id="btnAddPlatFormOK"><i class="fa fa-check"></i>确定</button>
            </div>
        </div>
    </div>
</div>

@*删除平台类别*@
<div class="modal fade" id="DelPlatFormCategoryModal" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"> &times;</button>
                <h4 class="modal-title">平台分类：(<span id="Delete_Head_Title">***</span>)删除确认页面</h4>
            </div>
            <div class="modal-body">
                <form id="DelPlatFormCategoryOperation" method="post" class="form-horizontal">
                    <input type="hidden" id="delete_platformcategory_id" name="delete_platformcategory_id" />
                    <div class="form-group">
                        <div class="input-group">
                            您确认要删除平台分类（<span id="Delete_Head_Title_OK">***</span>)吗？
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-reply"></i>取消</button>
                <button type="button" class="btn btn-primary" id="btnDeletePlatFormOK"><i class="fa fa-check"></i>确定</button>
            </div>
        </div>
    </div>
</div>

<script src="~/Scripts/project/min/platformcategory.min.js"></script>
<script type="text/javascript">
    $(function () {
        ml.admin.platformcategory.init();
    });
</script>